<?php 
/**
 * File: View - Grupos - edit.phtml
 */
 
$this->jQuery()->addJavascriptFile( $this->layout_base . '/third/js/modules/grupos.js');
?>
			<div class="page-title ui-widget-content ui-corner-all">
				<div>
						<div class="float-left">
							<br />
							<h1>Editar <?php echo $this->moduleTitle ?></h1>
						</div>
						<div class="button float-right">
							<a href="/third/grupos"  class="btn ui-state-default"><span class="ui-icon ui-icon-circle-triangle-w"></span>Voltar para listagem</a>
						</div>
						<div class="clearfix"></div>
				</div>
				<div id="main-itens-content" class="other" >
					<?php echo($this->flashMessages()); ?>

					<div class="cont ui-corner-all yellow-box ">
						Editando grupo: <strong><?php echo $this->grupo['nivel'] ?></strong>
					</div>
					<Br />
					<div class="three-column-small">
						<!-- DADOS -->
							<div  class="column">
								<div class="portlet">
									<div class="portlet-header">Dados</div>
									<div class="portlet-content">
											<?php 
												if( $this->formErro ){
													echo "<div class='response-msg error ui-corner-all'>".$this->formErro."</div>"; 
												}
											?>
											<?php echo $this->form; ?>
									</div>
								</div>
								
								<div class="portlet">
									<div class="portlet-header">A&ccedil;&otilde;es</div>
									<div class="portlet-content">
										<ul>
											<li><a href="/third/grupos/limpar-cache/id/<?php echo $this->grupo['nivel'] ?>" class="btn ui-state-default"><span class="ui-icon ui-icon-link"></span>Limpar cache dos privil&eacute;gios</a></li>
										<?php if( $this->grupo['status'] == "1" ){ ?>
											<li><a href="/third/grupos/unlock/id/<?php echo $this->grupo['nivel'] ?>" class="btn ui-state-default"><span class="ui-icon ui-icon-locked"></span>Bloquear grupo</a></li>
										<?php } else if( $this->grupo['status'] == "0" ) { ?>
											<li><a href="/third/grupos/unlock/id/<?php echo $this->grupo['nivel'] ?>" class="btn ui-state-default"><span class="ui-icon ui-icon-unlocked"></span>Liberar grupo</a></li>	
										<?php } ?>
											<li><a href="/third/grupos/delete/id/<?php echo $this->grupo['nivel'] ?>" class="btn ui-state-default"><span class="ui-icon ui-icon-minus"></span>Remover grupo</a></li>
										</ul>
									</div>
								</div>	
							</div>
							<!-- DADOS  END -->
							<!--  PRIVILEGIOS -->
							<div  class="column column-big">
								<div class="portlet">
									<div class="portlet-header">Privil&eacute;gios do grupo</div>
									<div class="portlet-content">
									<!-- PRIVILEGIOS -->
										<div id="privilegios_container"></div>
										<form action="/third/grupos/privilegios" method="post" id="privilegios_form_container" name="privilegios_form_container">
											<input type="submit" value="Salvar" />
													<?php echo $this->action('privileges-fields', 'grupos', 'third', array('privileges'=>$this->privileges) ) ?>
											<input type="hidden" name="nivel" value="<?php echo $this->grupo['nivel'] ?>" /><br /><input type="submit" value="Salvar" />
											<div class="clearfix"></div>
										</form>
									</div>
									<!-- PRIVILEGIOS -->
								</div>	
							</div>
							<!--  PRIVILEGIOS END -->	
					</div>
				</div>
					
				<div class="clearfix"></div>
			</div>
